#ifndef FILE_MANIPULATOR_H
#define FILE_MANIPULATOR_H

#include <stdio.h>

#define INITIALIZE_HTML_FILE_HANDLER(name) \
  file_handler_ptr name = init_file_handler(".html")

#define REMOVE_FILE_HANDLER(handler) \
  deinit_file_handler(handler)

typedef struct file_handler * file_handler_ptr;

file_handler_ptr
init_file_handler(const char *filter_extension);

void
deinit_file_handler(file_handler_ptr file_handler);

const char *
get_filter_extension(const file_handler_ptr file_handler);

const char *
get_filename(const file_handler_ptr file_handler);

void
initialize_file_path(file_handler_ptr file_handler,
                     const char *directory, const char *file);

FILE *
obtain_file_stream(file_handler_ptr file_handler);

#endif // FILE_MANIPULATOR_H
